<div class="lists index">
	
	<h2>
		<?php echo $this->Html->image("/admin/images/icons/icon_{$modelTag}.png"); ?>
		<?php echo ucwords($modelTag); ?>
	</h2>
	
	<span><?php echo $this->Html->link(__('Add'), array('action' => $modelTag, 'add'), array('class' => 'button add')); ?></span>
	
	<table cellpadding="0" cellspacing="0">
		<?php if (!$list): ?>
		<tr>
			<td><?php echo __("No " . $modelTag . " found."); ?></td>
		</tr>
		<?php else: ?>
		<tr>
			<th width="10%"><?php echo __('Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<?php if( $modelName == 'City'): ?>
			<th><?php echo __('Latitude'); ?></th>
			<th><?php echo __('Longitude'); ?></th>
			<?php endif; ?>
			<th width="10%" class="actions"><?php echo __('Actions'); ?></th>
		</tr>
		<?php foreach($list as $item): ?>
		<tr>
			<td><?php echo $item[$modelName]['id']; ?></td>
			<td><?php echo $item[$modelName]['name']; ?></td>
			<?php if( $modelName == 'City' ): ?>
			<td><?php echo $item[$modelName]['latitude']; ?></td>
			<td><?php echo $item[$modelName]['longitude']; ?></td>
			<?php endif; ?>
			<td class="actions">
				<?php
					// edit
					echo $this->Html->link(
						__('Edit'),
						array('action' => $modelTag, 'edit', $item[$modelName]['id']),
						array('escape' => false, 'class' => 'button edit')
					);
					// delete
					echo $this->Html->link(
						__('Delete'),
						array('action' => $modelTag, 'delete', $item[$modelName]['id']),
						array('escape' => false, 'class' => 'button delete'),
						__("Are you sure you want to delete this Item?")
					);
				?>
			</td>
		</tr>
		<?php endforeach; ?>
		<?php endif; ?>
	</table>
</div>
